<template>
  <div class="container">
    <el-tabs v-model="activeName" type="card">
      <el-tab-pane label="信息展示" name="first">
        <div class="map">
          <el-form ref="search" :inline="true" :model="form" class="search" size="small" label-width="100px">
            <el-form-item label="所属系统">
              <el-input v-model="form.system" placeholder="请输入所属系统" />
            </el-form-item>
            <el-form-item label="设备名称:">
              <el-input v-model="form.name" placeholder="请输入设备名称" />
            </el-form-item>
            <el-form-item label="空间列表:">
              <el-input v-model="form.pos" placeholder="请输入空间列表" />
            </el-form-item>
            <el-form-item>
              <el-button size="mini" type="primary" plain @click="onSubmit">
                查询
              </el-button>
            </el-form-item>
          </el-form>
          <el-table :data="tableData" stripe style="width: 100%" border>
            <el-table-column prop="pos" label="空间位置" align="center" />
            <el-table-column prop="num" label="设备编号" align="center" />
            <el-table-column prop="system" label="所属系统" align="center" />
            <el-table-column prop="name" label="设备名称" align="center" />
            <el-table-column prop="time" label="当前通讯时间" sortable="" align="center" />
            <el-table-column prop="state" label="设备状态" align="center" />
            <el-table-column prop="type" label="设备类型" align="center" />
            <el-table-column fixed="right" label="操作" width="400" show-overflow-tooltip resizable align="center">
              <template slot-scope="scope">
                <el-button size="mini" type="primary" plain @click="handleLook(scope.row)">
                  视频查看
                </el-button>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </el-tab-pane>
      <el-tab-pane label="图形展示" name="second">
        <Graphic />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import Graphic from './graphic.vue'
export default {
  components: {
    Graphic
  },
  data() {
    return {
      activeName: 'first',
      // 列表展示中表格数据
      tableData: [
        {
          pos: 'x-y',
          num: '001',
          system: '监控',
          name: '摄像头',
          time: '2022-02-01 13:00:00',
          state: '运行',
          type: '监控'
        },
        {
          pos: 'x-y',
          num: '001',
          system: '监控',
          name: '摄像头',
          time: '2022-02-01 13:00:00',
          state: '运行',
          type: '监控'
        },
        {
          pos: 'x-y',
          num: '001',
          system: '监控',
          name: '摄像头',
          time: '2022-02-01 13:00:00',
          state: '运行',
          type: '监控'
        },
        {
          pos: 'x-y',
          num: '001',
          system: '监控',
          name: '摄像头',
          time: '2022-02-01 13:00:00',
          state: '运行',
          type: '监控'
        },
        {
          pos: 'x-y',
          num: '001',
          system: '监控',
          name: '摄像头',
          time: '2022-02-01 13:00:00',
          state: '运行',
          type: '监控'
        }
      ],
      // 查询条件表单
      form: {
        system: '',
        name: '',
        pos: ''
      }
    }
  }
}
</script>

<style lang="scss" scoped>
* {
  margin: 0;
}
.el-form {
  margin-top: 10px;
  margin-bottom: 20px;
}
.button {
  padding-bottom: 15px;
}
</style>
